package hu.rsc.feeds.server;

import hu.rsc.feeds.client.data.GeneratedEntry;
import hu.rsc.feeds.client.data.UserInfo;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class XslTestServlet extends HttpServlet {

    private static final long serialVersionUID = 1268908910096781069L;

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) {

	GeneratedEntry entry = new GeneratedEntry();
	entry.setDescription("description hahahha");
	entry.setLink("origo.hu");
	entry.setTitle("Ez meg itten a title");

	UserInfo sender = new UserInfo();
	sender.setEmail("test@test.hu");
	sender.setUserName("testuser");
	sender.setLang(UserInfo.LANG_EN);

	response.setContentType("text/html");
	try {
	    SendOfferMail se = new SendOfferMail(entry, sender, null, response.getOutputStream());
	} catch (IOException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	}

    }
}
